package com.ewerp.mud.core.session;

import com.ewerp.mud.core.plugin.IPluginManager;

/**
 * Generates sessions and registers them with the associated {@link ISessionManager}.
 * 
 * @author cboyden
 *
 */
public interface ISessionFactory {
    /**
     * Register an {@link ISessionManager} with this {@link ISessionFactory} that this
     * {@link ISessionFactory} should register new {@link ISession}s with.
     * @param sessionManager The {@link ISessoinManager} with which to register new {@link ISessions}s. <br />
     * <ul>
     *            <li>{@link ISessionManager} : A valid session manager implementing
     *            {@link ISessionManager}</li>
     *            <li>null : A null value will result in an
     *            {@link IllegalArgumentException}</li>
     *            </ul>
     * @throws IllegalArgumentException
     *             Must be thrown if {@link IPluginManager} is null
     */
    public void registerSessionManager(ISessionManager sessionManager) throws IllegalArgumentException;
}
